package com.cssw.fyzb.core.dao.user;

import com.cssw.fyzb.core.model.dodb.District;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class DistrictDaoImpl implements DistrictDao {

    @Override
    public List<District> listByDistrictType(String districtType) {
        String sql = "select * from d_district where district_type='?'";
        return District.dao.find(sql, districtType);
    }

    @Override
    public List<District> list() {
        return District.dao.findAll();
    }

    @Override
    public District getByCode(String districtCode) {
        return District.dao.findById(districtCode);
    }
}
